import java.io.PrintWriter;
import java.io.FileNotFoundException;

public class CreateICSFile {

	public static void main(String[] args) {
		
		String fileName = "event.ics";
		PrintWriter outputStream = null;
		try
		{
			outputStream = new PrintWriter(fileName);
		}
		catch(FileNotFoundException e)
		{
			System.out.println("Error opening the file" + fileName);
			System.exit(0);
		}
		
		outputStream.println("BEGIN:VCALENDAR");
		outputStream.println("VERSION:2.0");
		outputStream.println("PRODID:-//Google Inc//Google Calendar 70.9054//EN");
		outputStream.println("BEGIN:VEVENT");
		outputStream.println("DTSTART:20140813T200000Z");
		outputStream.println("DTEND:20140813T230000Z");
		outputStream.println("DTSTAMP:20140722T063626Z");
		outputStream.println("UID:26mipul5llb2qkndnp6smbok4s@google.com");
		outputStream.println("CREATED:20140722T063450Z");
		outputStream.println("DESCRIPTION:");
		outputStream.println("LAST-MODIFIED:20140722T063450Z");
		outputStream.println("LOCATION:Thomas Hale Hamilton Library\\, 2550 McCarthy mall\\, Honolulu\\, HI\\ , United States");
		outputStream.println("SEQUENCE:0");
		outputStream.println("STATUS:CONFIRMED");
		outputStream.println("SUMMARY:Study for exam");
		outputStream.println("TRANSP:OPAQUE");
		outputStream.println("END:VEVENT");
		outputStream.println("END:VCALENDAR");
		
		outputStream.close();
		
	}

}
